<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>go基础知识 | Threadv</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="go基础知识12345678package mainimport &quot;fmt&quot;func main() &amp;#123;   fmt.Println(&quot;Hello, World!&quot;)&amp;#125;  每个Go应用程序都包含一个名为 main 的包 “{“ 不能在单独的一行 ">
<meta name="keywords" content="go">
<meta property="og:type" content="article">
<meta property="og:title" content="go基础知识">
<meta property="og:url" content="http://yoursite.com/2020/03/16/go基础/index.html">
<meta property="og:site_name" content="Threadv">
<meta property="og:description" content="go基础知识12345678package mainimport &quot;fmt&quot;func main() &amp;#123;   fmt.Println(&quot;Hello, World!&quot;)&amp;#125;  每个Go应用程序都包含一个名为 main 的包 “{“ 不能在单独的一行 import的包如果下面没有使用到的话会报错;变量同是如此  变量声明 在 Go 语言中，采用的是后置类型的声明方式    1&amp;lt;命">
<meta property="og:updated_time" content="2020-05-12T14:23:21.116Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="go基础知识">
<meta name="twitter:description" content="go基础知识12345678package mainimport &quot;fmt&quot;func main() &amp;#123;   fmt.Println(&quot;Hello, World!&quot;)&amp;#125;  每个Go应用程序都包含一个名为 main 的包 “{“ 不能在单独的一行 import的包如果下面没有使用到的话会报错;变量同是如此  变量声明 在 Go 语言中，采用的是后置类型的声明方式    1&amp;lt;命">
  
    <link rel="alternate" href="/atom.xml" title="Threadv" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Threadv</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Suche"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-go基础" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/03/16/go基础/" class="article-date">
  <time datetime="2020-03-16T11:20:35.000Z" itemprop="datePublished">2020-03-16</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      go基础知识
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="go基础知识"><a href="#go基础知识" class="headerlink" title="go基础知识"></a>go基础知识</h1><figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> main</span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> <span class="string">"fmt"</span></span><br><span class="line"></span><br><span class="line"><span class="function"><span class="keyword">func</span> <span class="title">main</span><span class="params">()</span></span> &#123;</span><br><span class="line"></span><br><span class="line">   fmt.Println(<span class="string">"Hello, World!"</span>)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<ul>
<li>每个Go应用程序都包含一个名为 main 的包</li>
<li>“{“ 不能在单独的一行</li>
<li>import的包如果下面没有使用到的话会报错;变量同是如此</li>
</ul>
<h3 id="变量声明"><a href="#变量声明" class="headerlink" title="变量声明"></a>变量声明</h3><ul>
<li>在 Go 语言中，采用的是后置类型的声明方式    <figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&lt;命名&gt; &lt;类型&gt;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">x <span class="keyword">int</span> <span class="comment">// 定义 x 为整数类型</span></span><br></pre></td></tr></table></figure>
<ul>
<li><p>在 Go 语言中通常我们使用关键字 var 来声明变量</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> x <span class="keyword">int</span> <span class="comment">// 表示声明一个名为 x 的整数变量</span></span><br><span class="line"><span class="keyword">var</span> b <span class="keyword">int</span> = <span class="number">1</span> <span class="comment">// 表示声明一个名为 b 的整数变量，并且附上初始值为 1</span></span><br><span class="line"><span class="keyword">var</span> b = <span class="number">1</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>可同时声明</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> (</span><br><span class="line">    a, b <span class="keyword">int</span>  <span class="comment">// 同时声明 a, b 的整数</span></span><br><span class="line">    c <span class="keyword">float64</span></span><br><span class="line">)</span><br></pre></td></tr></table></figure>
</li>
<li><p><strong>简短声明方式</strong></p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">a := <span class="number">1</span> <span class="comment">// 声明 a 为 1 的整数</span></span><br><span class="line">b := <span class="keyword">int64</span>(<span class="number">1</span>)  <span class="comment">// 声明 b 为 1 的 64 位整数</span></span><br></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="常量定义"><a href="#常量定义" class="headerlink" title="常量定义"></a>常量定义</h3><ul>
<li>常量指定的值类型主要有三类： 布尔，数字，字符串， 其中数字类型包含（rune, integer, floating-point, complex), 它们都属于基本数据类型。</li>
<li>不能使用 :=<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> a = <span class="number">64</span> <span class="comment">// 定义常量值为 64 的值</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">const</span> (</span><br><span class="line">  b = <span class="number">4</span></span><br><span class="line">  c = <span class="number">0.1</span></span><br><span class="line">)</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="Go-语言中的基本数据类型"><a href="#Go-语言中的基本数据类型" class="headerlink" title="Go 语言中的基本数据类型"></a>Go 语言中的基本数据类型</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line">bool      the set of boolean (true, false)</span><br><span class="line"></span><br><span class="line">uint8      the set of all unsigned  8-bit integers (0 to 255)</span><br><span class="line">uint16      the set of all unsigned 16-bit integers (0 to 65535)</span><br><span class="line">uint32      the set of all unsigned 32-bit integers (0 to 4294967295)</span><br><span class="line">uint64      the set of all unsigned 64-bit integers (0 to 18446744073709551615)</span><br><span class="line"></span><br><span class="line">int8      the set of all signed  8-bit integers (-128 to 127)</span><br><span class="line">int16      the set of all signed 16-bit integers (-32768 to 32767)</span><br><span class="line">int32      the set of all signed 32-bit integers (-2147483648 to 2147483647)</span><br><span class="line">int64      the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)</span><br><span class="line"></span><br><span class="line">float32      the set of all IEEE-754 32-bit floating-point numbers</span><br><span class="line">float64      the set of all IEEE-754 64-bit floating-point numbers</span><br><span class="line"></span><br><span class="line">complex64      the set of all complex numbers with float32 real and imaginary parts</span><br><span class="line">complex128      the set of all complex numbers with float64 real and imaginary parts</span><br><span class="line"></span><br><span class="line">byte      alias for uint8</span><br><span class="line">rune      alias for int32</span><br><span class="line">uint      either 32 or 64 bits</span><br><span class="line">int      same size as uint</span><br><span class="line">uintptr      an unsigned integer large enough to store the uninterpreted bits of a pointer value</span><br><span class="line"></span><br><span class="line">string      the set of string value (eg: "hi")</span><br></pre></td></tr></table></figure>
<ul>
<li><p>布尔类型</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> a <span class="keyword">bool</span></span><br><span class="line"><span class="keyword">var</span> a = <span class="literal">true</span></span><br><span class="line">a := <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">const</span> a = <span class="literal">true</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>数字类型</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> (</span><br><span class="line">  a <span class="keyword">uint8</span> = <span class="number">1</span></span><br><span class="line">  b <span class="keyword">int8</span> = <span class="number">1</span></span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> (</span><br><span class="line">    c <span class="keyword">int</span> = <span class="number">64</span></span><br><span class="line">)</span><br></pre></td></tr></table></figure>
</li>
<li><p>字符串</p>
<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> a = <span class="string">"hello"</span> <span class="comment">//单行字符串</span></span><br><span class="line"><span class="keyword">var</span> c = <span class="string">"\""</span> <span class="comment">// 转义符</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> b = <span class="string">`hello`</span> <span class="comment">//原样输出</span></span><br><span class="line"><span class="keyword">var</span> d = <span class="string">`line3  //多行输出</span></span><br><span class="line"><span class="string">line1</span></span><br><span class="line"><span class="string">line2</span></span><br><span class="line"><span class="string">`</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> str = <span class="string">"hello, 世界"</span></span><br><span class="line"></span><br><span class="line">b := str[<span class="number">0</span>]  <span class="comment">//b is a uint8 type, like byte</span></span><br><span class="line">fmt.Println(b)  <span class="comment">// 104</span></span><br><span class="line">fmt.Println(<span class="keyword">string</span>(b)) <span class="comment">// h</span></span><br><span class="line"></span><br><span class="line">fmt.Println(<span class="built_in">len</span>(str)) <span class="comment">//12, 查看字符串有多少个字节</span></span><br><span class="line">fmt.Println(<span class="built_in">len</span>([]<span class="keyword">rune</span>(str))) <span class="comment">// 8 查看有多少个字符</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>特殊类型</p>
</li>
<li>byte，uint8 别名，用于表示二进制数据的 bytes</li>
<li>rune，int32 别名, 用于表示一个符号<figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> str = <span class="string">"hello, 世界"</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> _, char := <span class="keyword">range</span> str &#123;</span><br><span class="line">  fmt.Printf(<span class="string">"%T"</span>, char)</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="运算符"><a href="#运算符" class="headerlink" title="运算符"></a>运算符</h3><ul>
<li>位运算</li>
</ul>
<ol>
<li><p>按位与&amp;： T（true）替换为 1， F（false）替换为 0</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">1 &amp; 1 -&gt; 1</span><br><span class="line">1 &amp; 0 -&gt; 0</span><br><span class="line">0 &amp; 1 -&gt; 0</span><br><span class="line">0 &amp; 0 -&gt; 0</span><br></pre></td></tr></table></figure>
</li>
<li><p>按位或 |： T（true）替换为 1， F（false）替换为 0</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">1 | 1 -&gt; 1</span><br><span class="line">1 | 0 -&gt; 1</span><br><span class="line">0 | 1 -&gt; 1</span><br><span class="line">0 | 0 -&gt; 0</span><br></pre></td></tr></table></figure>
</li>
<li><p>按位异或 ^： 相同为0，不同为1</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">1 ^ 1 -&gt; 0</span><br><span class="line">1 ^ 0 -&gt; 1</span><br><span class="line">0 ^ 1 -&gt; 1</span><br><span class="line">0 ^ 0 -&gt; 0</span><br></pre></td></tr></table></figure>
</li>
</ol>
<ul>
<li>逻辑运算符</li>
</ul>
<ol>
<li><p>非运算符：!</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">!T -&gt; false</span><br><span class="line">!F -&gt; true</span><br></pre></td></tr></table></figure>
</li>
<li><p>和运算符：&amp;&amp;</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">T &amp;&amp; T -&gt; true</span><br><span class="line">T &amp;&amp; F -&gt; false</span><br><span class="line">F &amp;&amp; T -&gt; false</span><br><span class="line">F &amp;&amp; F -&gt; false</span><br></pre></td></tr></table></figure>
</li>
<li><p>或运算符：||</p>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">T || T -&gt; true</span><br><span class="line">T || F -&gt; true</span><br><span class="line">F || T -&gt; true</span><br><span class="line">F || F -&gt; fals</span><br></pre></td></tr></table></figure>
</li>
<li></li>
</ol>
<ul>
<li>算术运算符</li>
</ul>
<ol>
<li>常见可用于整数和浮点数的二元运算符有 +、-、* 和 /。</li>
<li>/ 对与整数运算而言，结果依旧为整数，例如：9 / 4 -&gt; 2。</li>
<li>取余运算符只能作用于整数：9 % 4 -&gt; 1。</li>
</ol>
<p>可以将语句 b = b + a 简写为 b+=a，同样的写法也可用于 -=、*=、/=、%=<br>对于整数和浮点数，你可以使用一元运算符 ++（递增）和 –（递减），但只能用于后缀：<br><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">i++ -&gt; i += 1 -&gt; i = i + 1</span><br><span class="line">i-- -&gt; i -= 1 -&gt; i = i - 1</span><br></pre></td></tr></table></figure></p>
<p>带有 ++ 和 – 的只能作为语句，而非表达式，因此 n = i++ 这种写法是无效的，其它像 f(i++) 或者 a[i]=b[i++] 这些可以用于 C、C++ 和 Java 中的写法在 Go 中也是不允许的。</p>
<ul>
<li>运算符与优先级 ↑<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">优先级     运算符</span><br><span class="line"> 7         ^ !</span><br><span class="line"> 6         * / % &lt;&lt; &gt;&gt; &amp; &amp;^</span><br><span class="line"> 5         + - | ^</span><br><span class="line"> 4         == != &lt; &lt;= &gt;= &gt;</span><br><span class="line"> 3         &lt;-</span><br><span class="line"> 2         &amp;&amp;</span><br><span class="line"> 1         ||</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="时间和日期"><a href="#时间和日期" class="headerlink" title="时间和日期"></a>时间和日期</h3><figure class="highlight go"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">package</span> main</span><br><span class="line"><span class="keyword">import</span> (</span><br><span class="line">    <span class="string">"fmt"</span></span><br><span class="line">    <span class="string">"time"</span></span><br><span class="line">)</span><br><span class="line"></span><br><span class="line"><span class="keyword">var</span> week time.Duration</span><br><span class="line"><span class="function"><span class="keyword">func</span> <span class="title">main</span><span class="params">()</span></span> &#123;</span><br><span class="line">    t := time.Now()</span><br><span class="line">    fmt.Println(t) <span class="comment">// e.g. Wed Dec 21 09:52:14 +0100 RST 2011</span></span><br><span class="line">    fmt.Printf(<span class="string">"%02d.%02d.%4d\n"</span>, t.Day(), t.Month(), t.Year())</span><br><span class="line">    <span class="comment">// 21.12.2011</span></span><br><span class="line">    t = time.Now().UTC()</span><br><span class="line">    fmt.Println(t) <span class="comment">// Wed Dec 21 08:52:14 +0000 UTC 2011</span></span><br><span class="line">    fmt.Println(time.Now()) <span class="comment">// Wed Dec 21 09:52:14 +0100 RST 2011</span></span><br><span class="line">    <span class="comment">// calculating times:</span></span><br><span class="line">    week = <span class="number">60</span> * <span class="number">60</span> * <span class="number">24</span> * <span class="number">7</span> * <span class="number">1e9</span> <span class="comment">// must be in nanosec</span></span><br><span class="line">    week_from_now := t.Add(week)</span><br><span class="line">    fmt.Println(week_from_now) <span class="comment">// Wed Dec 28 08:52:14 +0000 UTC 2011</span></span><br><span class="line">    <span class="comment">// formatting times:</span></span><br><span class="line">    fmt.Println(t.Format(time.RFC822)) <span class="comment">// 21 Dec 11 0852 UTC</span></span><br><span class="line">    fmt.Println(t.Format(time.ANSIC)) <span class="comment">// Wed Dec 21 08:56:34 2011</span></span><br><span class="line">    fmt.Println(t.Format(<span class="string">"02 Jan 2006 15:04"</span>)) <span class="comment">// 21 Dec 2011 08:52</span></span><br><span class="line">    s := t.Format(<span class="string">"20060102"</span>)</span><br><span class="line">    fmt.Println(t, <span class="string">"=&gt;"</span>, s)</span><br><span class="line">    <span class="comment">// Wed Dec 21 08:52:14 +0000 UTC 2011 =&gt; 20111221</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2020/03/16/go基础/" data-id="ckcc5iwk3001pq4uw0351wffw" class="article-share-link">Teilen</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/go/">go</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/03/29/hello-world/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Neuer</strong>
      <div class="article-nav-title">
        
          Hello World
        
      </div>
    </a>
  
  
    <a href="/2020/03/16/go安装和配置/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Älter</strong>
      <div class="article-nav-title">go安装和配置</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Design-Patterns/">Design Patterns</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Git/">Git</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Html/">Html</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Http/">Http</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Sort/">Sort</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/algorithm/">algorithm</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ali-weixin-pay/">ali/weixin pay</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/docker/">docker</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/elasticsearch/">elasticsearch</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/go/">go</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/idea/">idea</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/jvm/">jvm</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/logstash/">logstash</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mysql/">mysql</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/php/">php</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/pytest/">pytest</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/python/">python</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/springboot/">springboot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/util/">util</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vue/">vue</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wechat/">wechat</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/我的世界/">我的世界</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/消息队列/">消息队列</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/线程/">线程</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Design-Patterns/" style="font-size: 16.36px;">Design Patterns</a> <a href="/tags/Git/" style="font-size: 10px;">Git</a> <a href="/tags/Html/" style="font-size: 10px;">Html</a> <a href="/tags/Http/" style="font-size: 12.73px;">Http</a> <a href="/tags/JavaScript/" style="font-size: 15.45px;">JavaScript</a> <a href="/tags/Sort/" style="font-size: 18.18px;">Sort</a> <a href="/tags/algorithm/" style="font-size: 11.82px;">algorithm</a> <a href="/tags/ali-weixin-pay/" style="font-size: 13.64px;">ali/weixin pay</a> <a href="/tags/docker/" style="font-size: 17.27px;">docker</a> <a href="/tags/elasticsearch/" style="font-size: 10px;">elasticsearch</a> <a href="/tags/go/" style="font-size: 11.82px;">go</a> <a href="/tags/hexo/" style="font-size: 10px;">hexo</a> <a href="/tags/idea/" style="font-size: 10px;">idea</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/jvm/" style="font-size: 11.82px;">jvm</a> <a href="/tags/linux/" style="font-size: 18.18px;">linux</a> <a href="/tags/logstash/" style="font-size: 12.73px;">logstash</a> <a href="/tags/mysql/" style="font-size: 14.55px;">mysql</a> <a href="/tags/php/" style="font-size: 11.82px;">php</a> <a href="/tags/pytest/" style="font-size: 10px;">pytest</a> <a href="/tags/python/" style="font-size: 13.64px;">python</a> <a href="/tags/springboot/" style="font-size: 17.27px;">springboot</a> <a href="/tags/util/" style="font-size: 19.09px;">util</a> <a href="/tags/vue/" style="font-size: 10px;">vue</a> <a href="/tags/wechat/" style="font-size: 10.91px;">wechat</a> <a href="/tags/我的世界/" style="font-size: 10px;">我的世界</a> <a href="/tags/消息队列/" style="font-size: 10.91px;">消息队列</a> <a href="/tags/线程/" style="font-size: 11.82px;">线程</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archiv</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/05/">May 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/04/">April 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/03/">March 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/01/">January 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/10/">October 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/08/">August 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/06/">June 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/04/">April 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/03/">March 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/02/">February 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2019/01/">January 2019</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/12/">December 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/11/">November 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/10/">October 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/09/">September 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/07/">July 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/06/">June 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/05/">May 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/04/">April 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/03/">March 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/">February 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/">January 2018</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/">December 2017</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">letzter Beitrag</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2020/05/17/linux/linux_shell/">linux—shell</a>
          </li>
        
          <li>
            <a href="/2020/05/16/linux/linux_awk_sed/">linux-awk\sed 示例</a>
          </li>
        
          <li>
            <a href="/2020/04/11/linux/linux_bash/">linux—bash</a>
          </li>
        
          <li>
            <a href="/2020/03/29/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2020/03/16/go基础/">go基础知识</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 vchen<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



  </div>
</body>
</html>